<?php
namespace app\validate;

use share\validate\SceneValidate;

class MerchantInfoTableValidate extends SceneValidate{

    protected $rule = [
        'id' =>  'require',
        'mchId' => 'require|length:1,60',
        'appId' => 'require|length:1,60',
        'payType' => 'require|integer',
        'appSecret'=> 'require|length:1,200',
    ];  
    
    protected $sceneRules = [   
        'edit' => [
            'id' =>  'require',
            'mchId' => 'length:1,60',
            'appId' => 'length:1,60',
            'payType' => 'integer',
            'appSecret'=> 'length:1,200',
        ]
    ];

    protected $scene = [
        'add' => ['mchId','appId','appSecret','payType'],  
        'edit' => ['id','mchId','appId','appSecret','payType'],      
        'del' => ['id'],
    ];
}